package com.headingdata.d3_inner_class3;

public class Test {

    public static void main(String[] args) {

        Animal a = new Animal(){

            @Override
            void cry() {
                System.out.println("猫咪喵喵喵的叫！");
            }
        };
        a.cry();

    }
}


//class Cat extends Animal{
//
//    @Override
//    void cry() {
//        System.out.println("猫咪喵喵喵的叫！");
//    }
//}

abstract class Animal{
    abstract void cry();
}
